﻿#ifndef USERDETAIL_TOMODIFYPASSWORDDLG_H
#define USERDETAIL_TOMODIFYPASSWORDDLG_H

#include <QWidget>
#include <QJsonObject>
#include <QBoxLayout>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QFormLayout>
#include "eventfilterobject.h"
#include "SHttpClient.h"
#include "SApp.h"
#include <QMessageBox>
#include "MaskWidget.h"




class UserDetail_toModifyPasswordDlg : public QWidget
{
	Q_OBJECT
private:
	QJsonObject m_user;
	QJsonObject m_Newuser;


	QVBoxLayout* totality_layout{};
	QFormLayout* newpassword_layout{};		//新密码的布局

	QLineEdit* m_user_id_edit{};
	QLineEdit* m_username_edit{};
	QLineEdit* m_oldpassword_edit{};
	QLineEdit* m_newpassword_edit{};
	QPushButton* m_ok_btn{};
	QPushButton* m_cancel_btn{};

signals:
	void UserDataChanged(const QJsonObject& user);
	void windowclose();
public:
	UserDetail_toModifyPasswordDlg(QWidget* parent = nullptr);
	~UserDetail_toModifyPasswordDlg();

	void init();

	void setUserData(const QJsonObject& object);
	void updateUi();

	void connectinit();

public:
	void on_OKBtnslot();

};

#endif // !USERDETAIL_TOMODIFYPASSWORDDLG_H
